@import './variable.less';

.xh {
  html,
  body,
  #root {
    position: relative;
    overflow: hidden;
  }

  .ant-layout {
    overflow-y: hidden;
    background: #eceff2;
  }

  .ant-row {
    height: auto;
  }

  // 日期控件
  .ant-picker {
    padding: 2px 6px 2px;
  }

  // 树
  .ant-tree {
    font-size: 13px;
  }
  .ant-tree,
  .ant-tree-show-line .ant-tree-switcher {
    background: transparent;
  }
  .ant-tree > li:first-child,
  .ant-tree-child-tree > li:first-child {
    padding: 0px;
  }
  .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
    background-color: #bfe2ff;
  }
  .ant-tree-switcher {
    padding-right: 4px;
    color: #939393;
    text-align: right;
  }

  //checkbox
  .ant-checkbox + span {
    padding-right: 0;
    padding-left: 5px;
    font-size: 13px;
  }
  .ant-popover-inner-content {
    padding: 5px;

    p {
      margin: 0;
      padding: 5px 0;
    }
  }

  // tabs
  .ant-tabs-nav {
    padding-left: 4px;
    color: #333;
    background-color: #d8d8d8;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;

    .ant-tabs-nav-wrap {
      height: 30px;
    }
    .ant-tabs-tab {
      padding: 6px 16px;
    }
  }
  .ant-tabs-top > .ant-tabs-nav,
  .ant-tabs-bottom > .ant-tabs-nav,
  .ant-tabs-top > div > .ant-tabs-nav,
  .ant-tabs-bottom > div > .ant-tabs-nav {
    margin-bottom: 0px;
  }
  .ant-tabs-bar {
    margin: 0px;
  }
  .ant-tabs-content,
  .ant-tabs-tabpane {
    height: 100%;
  }
  .ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container,
  .ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active {
    height: 30px;
  }
  .ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab {
    height: 30px;
    line-height: 30px;
  }
  .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn,
  .ant-tabs-tab:hover {
    color: @first-color;
  }
  .ant-tabs-ink-bar {
    background-color: @first-color;
  }
  .ant-tabs-tab + .ant-tabs-tab {
    margin: 0 0 0 20px;
  }

  // xinherc
  .xinherc-dp-range .input-panel {
    flex: 0 0 @first-height;
    height: @first-height;
  }
  .xinherc-dp .react-datepicker__input-container {
    padding: 1px 4px;
  }
  .xinherc-xdraggablemodal {
    .ant-modal-header {
      padding: 6px 10px;
      background-color: #efefef;
    }
    .ant-modal-close-x {
      width: 40px;
      height: 35px;
      line-height: 35px;
    }
  }

  // 下拉
  .ant-select-single .ant-select-selector .ant-select-selection-search {
    left: 2px;
  }
  .ant-select-selection {
    line-height: 25px;
    border-radius: 2px;
  }
  .ant-select-selection__rendered {
    margin: 0px;
    padding-left: 0px;
    font-size: 13px;
    line-height: 22px;
    text-indent: 2px;
  }
  .ant-select-selection--single {
    height: 25px;
    line-height: 25px;
  }
  .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
    font-weight: normal;
    background-color: #bfe2ff;
  }
  .ant-select-dropdown {
    padding: 2px;
  }
  .ant-select-item {
    min-height: 26px;
    padding: 2px 7px;
  }
  .ant-select-single:not(.ant-select-customize-input)
    .ant-select-selector
    .ant-select-selection-search-input {
    height: 25px;
    line-height: 25px;
  }
  .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    width: 100%;
    height: @first-height;
    padding: 2px 4px;
    line-height: 0px;
  }
  .ant-select-single .ant-select-selector .ant-select-selection-item,
  .ant-select-single .ant-select-selector .ant-select-selection-placeholder {
    line-height: 22px;
  }

  // 下拉多选
  .ant-select-selection--multiple {
    min-height: 25px;
  }
  .ant-select-selection--multiple .ant-select-selection__clear {
    top: 13px;
  }
  .ant-select-selection--multiple .ant-select-selection__choice {
    padding: 0px 20px 0px 0px;
  }
  .ant-select-selection--multiple > ul > li,
  .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
    height: 20px;
    margin-top: 2px;
    line-height: 18px;
  }
  .ant-select-multiple .ant-select-selector {
    padding: 0 4px;
  }
  .ant-select-multiple .ant-select-selector::after {
    line-height: 22px;
  }
  .ant-select-multiple .ant-select-selection-item {
    height: 20px;
    margin-top: 1px;
    margin-bottom: 1px;
    line-height: 18px;
  }

  // ant btn primary
  .ant-btn-primary {
    background: @third-color;
    border-color: @third-color;
  }
  .ant-btn-primary:active,
  .ant-btn-primary:hover,
  .ant-btn-primary.active {
    background: @fourth-color;
    border: 1px solid @fourth-color;
  }
  .ant-btn > .anticon + span {
    margin-left: 3px;
  }
  .ant-btn {
    min-width: 50px;
    height: @first-height;
    padding: @second-padding;
  }
  .ant-btn-primary[disabled],
  .ant-btn-primary[disabled]:hover,
  .ant-btn-primary[disabled]:focus,
  .ant-btn-primary[disabled]:active {
    color: rgba(0, 0, 0, 0.25);
    background: #f5f5f5;
    border-color: #d9d9d9;
  }
  .ant-btn-circle {
    width: 28px;
    min-width: 28px;
    height: 28px;
    padding: 0;
    line-height: 28px;
  }
  .ant-btn-background-ghost.ant-btn-primary {
    color: #333;
    background-color: #f2f2f2;
    border-color: #f2f2f2;
  }
  .ant-btn-icon-only {
    min-width: auto;
  }

  // ant input
  .ant-input[disabled],
  .ant-select-disabled {
    color: rgba(0, 0, 0, 0.85);
  }
  .ant-input {
    padding: @first-padding;
  }
  // 输入框右侧有单位
  .ant-input-affix-wrapper {
    height: @first-height;
    padding: 2px 4px;
  }
  .ant-input-suffix {
    color: #999;
  }

  // ant form-item
  .ant-form-item {
    margin-bottom: @first-margin-bottom;
    line-height: 1px;
  }
  .ant-form-item-label > label::after {
    margin: 0px 4px 0px 2px;
  }
  .ant-form-inline .ant-form-item:last-child {
    margin-right: 0;
  }
  .ant-form-item-label {
    line-height: @first-height;
    text-align: right;
  }
  .ant-form-item-control {
    line-height: @first-height;
  }
  .ant-form-item-control-input {
    min-height: @first-height;
  }
  .ant-form-item-label > label {
    height: @first-height;
    color: @fifth-color;
    font-size: 13px;
  }
  .ant-form-item-control-input-content {
    text-align: left;
  }

  // ant-divider
  .ant-divider-horizontal.ant-divider-with-text::before,
  .ant-divider-horizontal.ant-divider-with-text::after {
    border-top-color: #eceff2;
  }
  .ant-divider-horizontal.ant-divider-with-text {
    margin: 4px 0;
  }
  .ant-divider-inner-text {
    padding: 0 2px;
  }

  // menu
  .ant-menu-inline-collapsed-tooltip .ant-tooltip-inner,
  .ant-menu-inline-collapsed-tooltip .ant-tooltip-arrow-content {
    color: #fff;
    background-color: #1890ff;
  }

  // radio
  .ant-radio-button-wrapper {
    height: 28px;
    padding: 0 6px;
    line-height: 26px;
  }
  .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
    background: #eef5ff;
  }
  .ant-radio-wrapper {
    span.ant-radio + * {
      padding-right: 0;
      padding-left: 5px;
      font-size: 13px;
    }
  }

  //inputNumber
  .ant-input-number-input {
    height: 28px;
    padding-left: 4px;
  }

  //anchor
  .ant-anchor-ink {
    width: 8px;
  }
}
